home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / t2win_32.zip / _LANGAGE.FRM < prev    next >
Text File  |  1996-05-14  |  11KB  |  394 lines

  1. VERSION 4.00
  2. Begin VB.Form frmLanguage 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Language"
  5.    ClientHeight    =   4395
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   7170
  9.    Height          =   4800
  10.    Left            =   1830
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   4395
  14.    ScaleWidth      =   7170
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2925
  17.    Width           =   7290
  18.    Begin VB.ListBox List1 
  19.       Height          =   1035
  20.       Left            =   105
  21.       TabIndex        =   9
  22.       Top             =   3255
  23.       Width           =   6945
  24.    End
  25.    Begin VB.TextBox txt_Result 
  26.       BackColor       =   &H00C0C0C0&
  27.       BorderStyle     =   0  'None
  28.       Height          =   855
  29.       Left            =   105
  30.       Locked          =   -1  'True
  31.       MultiLine       =   -1  'True
  32.       ScrollBars      =   2  'Vertical
  33.       TabIndex        =   7
  34.       Top             =   630
  35.       Width           =   6945
  36.    End
  37.    Begin VB.Frame Frame1 
  38.       Caption         =   "Some objects"
  39.       Height          =   1275
  40.       Left            =   2625
  41.       TabIndex        =   3
  42.       Top             =   1575
  43.       Width           =   4425
  44.       Begin VB.TextBox Text1 
  45.          Height          =   330
  46.          Left            =   2415
  47.          TabIndex        =   8
  48.          Text            =   "Standard Text"
  49.          Top             =   735
  50.          Width           =   1800
  51.       End
  52.       Begin VB.CommandButton Command1 
  53.          Caption         =   "Standard Command"
  54.          Height          =   330
  55.          Left            =   210
  56.          TabIndex        =   4
  57.          Top             =   315
  58.          Width           =   1905
  59.       End
  60.       Begin Threed.SSCheck SSCheck1 
  61.          Height          =   330
  62.          Left            =   2415
  63.          TabIndex        =   6
  64.          Top             =   315
  65.          Width           =   1695
  66.          _Version        =   65536
  67.          _ExtentX        =   2990
  68.          _ExtentY        =   582
  69.          _StockProps     =   78
  70.          Caption         =   "OLE Check"
  71.          Font3D          =   1
  72.       End
  73.       Begin Threed.SSCommand SSCommand2 
  74.          Height          =   330
  75.          Left            =   210
  76.          TabIndex        =   5
  77.          Top             =   735
  78.          Width           =   1905
  79.          _Version        =   65536
  80.          _ExtentX        =   3360
  81.          _ExtentY        =   582
  82.          _StockProps     =   78
  83.          Caption         =   "OLE Command"
  84.          Font3D          =   1
  85.          RoundedCorners  =   0   'False
  86.       End
  87.    End
  88.    Begin Threed.SSFrame SSFrame1 
  89.       Height          =   1275
  90.       Index           =   1
  91.       Left            =   105
  92.       TabIndex        =   0
  93.       Tag             =   "Tag for SSFrame1"
  94.       Top             =   1575
  95.       Width           =   2325
  96.       _Version        =   65536
  97.       _ExtentX        =   4101
  98.       _ExtentY        =   2249
  99.       _StockProps     =   14
  100.       Caption         =   "&Select a language"
  101.       Begin Threed.SSOption SSOption1 
  102.          Height          =   225
  103.          Index           =   1
  104.          Left            =   210
  105.          TabIndex        =   2
  106.          Top             =   840
  107.          Width           =   1905
  108.          _Version        =   65536
  109.          _ExtentX        =   3360
  110.          _ExtentY        =   397
  111.          _StockProps     =   78
  112.          Caption         =   "&French"
  113.       End
  114.       Begin Threed.SSOption SSOption1 
  115.          Height          =   225
  116.          Index           =   0
  117.          Left            =   210
  118.          TabIndex        =   1
  119.          Top             =   420
  120.          Width           =   1905
  121.          _Version        =   65536
  122.          _ExtentX        =   3360
  123.          _ExtentY        =   397
  124.          _StockProps     =   78
  125.          Caption         =   "&English"
  126.          Value           =   -1  'True
  127.       End
  128.    End
  129.    Begin Threed.SSPanel SSPanel1 
  130.       Align           =   1  'Align Top
  131.       Height          =   480
  132.       Left            =   0
  133.       TabIndex        =   11
  134.       Top             =   0
  135.       Width           =   7170
  136.       _Version        =   65536
  137.       _ExtentX        =   12647
  138.       _ExtentY        =   847
  139.       _StockProps     =   15
  140.       ForeColor       =   -2147483640
  141.       BackColor       =   12632256
  142.       Begin VB.ComboBox cmb_Function 
  143.          Height          =   315
  144.          Left            =   1995
  145.          TabIndex        =   12
  146.          Top             =   90
  147.          Width           =   3840
  148.       End
  149.       Begin Threed.SSCommand cmdNP 
  150.          Height          =   300
  151.          Index           =   1
  152.          Left            =   6825
  153.          TabIndex        =   16
  154.          Top             =   90
  155.          Width           =   255
  156.          _Version        =   65536
  157.          _ExtentX        =   450
  158.          _ExtentY        =   529
  159.          _StockProps     =   78
  160.          Caption         =   ">"
  161.          BevelWidth      =   1
  162.          Font3D          =   3
  163.          RoundedCorners  =   0   'False
  164.          Outline         =   0   'False
  165.       End
  166.       Begin Threed.SSCommand cmdNP 
  167.          Height          =   300
  168.          Index           =   0
  169.          Left            =   5985
  170.          TabIndex        =   15
  171.          Top             =   90
  172.          Width           =   255
  173.          _Version        =   65536
  174.          _ExtentX        =   450
  175.          _ExtentY        =   529
  176.          _StockProps     =   78
  177.          Caption         =   "<"
  178.          BevelWidth      =   1
  179.          Font3D          =   3
  180.          RoundedCorners  =   0   'False
  181.          Outline         =   0   'False
  182.       End
  183.       Begin VB.Label Label2 
  184.          Caption         =   "&Select a function"
  185.          Height          =   255
  186.          Left            =   90
  187.          TabIndex        =   14
  188.          Top             =   120
  189.          Width           =   1815
  190.       End
  191.       Begin Threed.SSCommand SSCommand1 
  192.          Default         =   -1  'True
  193.          Height          =   300
  194.          Left            =   6300
  195.          TabIndex        =   13
  196.          Top             =   90
  197.          Width           =   465
  198.          _Version        =   65536
  199.          _ExtentX        =   820
  200.          _ExtentY        =   529
  201.          _StockProps     =   78
  202.          Caption         =   "&Go"
  203.          BevelWidth      =   1
  204.          RoundedCorners  =   0   'False
  205.          Outline         =   0   'False
  206.       End
  207.    End
  208.    Begin VB.Label Label1 
  209.       Caption         =   "Contents of the language file"
  210.       Height          =   225
  211.       Left            =   105
  212.       TabIndex        =   10
  213.       Top             =   2940
  214.       Width           =   6945
  215.    End
  216. End
  217. Attribute VB_Name = "frmLanguage"
  218. Attribute VB_Creatable = False
  219. Attribute VB_Exposed = False
  220. Option Explicit
  221. Option Base 1
  222.  
  223. Private Const Iteration = 10
  224.  
  225. Dim IsLoaded         As Integer
  226.  
  227. Dim TimerStartOk     As Integer
  228. Dim TimerCloseOk     As Integer
  229.  
  230. Dim TimerHandle      As Integer
  231. Dim TimerValue       As Long
  232.  
  233. Private Sub cmdNP_Click(Index As Integer)
  234.  
  235.    Call sub_NextPrev(cmb_Function, Index)
  236.  
  237. End Sub
  238.  
  239.  
  240. Private Sub cmb_Function_Click()
  241.    
  242.    If (IsLoaded = False) Then Exit Sub
  243.    
  244.    Call cDisableFI(mdiT2W.Picture1)
  245.    
  246.    txt_Result = ""
  247.    
  248.    DoEvents
  249.    
  250.    Select Case cmb_Function.ListIndex
  251.       Case 0
  252.          Call TestReadSaveCtlLanguage
  253.       Case 1
  254.          Call TestReadSaveCtlLanguageExt
  255.    End Select
  256.  
  257.    DoEvents
  258.    Call cEnableFI(mdiT2W.Picture1)
  259.    
  260. End Sub
  261.  
  262.  
  263. Private Sub Form_Activate()
  264.  
  265.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  266.  
  267. End Sub
  268.  
  269. Private Sub Form_Load()
  270.  
  271.    Dim intResult        As Integer
  272.  
  273.    IsLoaded = False
  274.    
  275.    Show
  276.  
  277.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_langage.t2w")
  278.    
  279.    intResult = cChDir(T2WDirTest)
  280.    
  281.    IsLoaded = True
  282.    
  283. End Sub
  284.  
  285. Private Sub SSCommand1_Click()
  286.    
  287.    Call cmb_Function_Click
  288.    
  289. End Sub
  290.  
  291. Private Sub TestReadSaveCtlLanguage()
  292.  
  293.    Dim intResult        As Integer
  294.    Dim strResult        As String
  295.    Dim strDisplay       As String
  296.    
  297.    Dim i                As Integer
  298.    
  299.    Dim File1            As String
  300.    
  301.    strResult = ""
  302.    strDisplay = ""
  303.    
  304.    Call cObjectMethod(List1, "clear", "")
  305.    
  306.    File1 = T2WDirTest + "\save control language.test"
  307.    
  308.    strDisplay = strDisplay & "SaveCtlLanguage of this Form is '" & cSaveCtlLanguage(Me, 255, File1) & "'" & vbCrLf
  309.    
  310.    strDisplay = strDisplay & "ReadCtlLanguage of this Form is '" & cReadCtlLanguage(Me, 255, File1) & "'" & vbCrLf
  311.    
  312.    strDisplay = strDisplay & "Load file '" & File1 & "' into the list box 'List1' is '" & cFileToListBox(List1.hWnd, File1) & "'"
  313.  
  314.    txt_Result = strDisplay
  315.    
  316.    'time the function
  317.  
  318.    TimerHandle = cTimerOpen()
  319.    TimerStartOk = cTimerStart(TimerHandle)
  320.    
  321.    For i = 1 To Iteration
  322.       intResult = cReadCtlLanguage(Me, 1, File1)
  323.    Next i
  324.    
  325.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  326.    
  327.    TimerCloseOk = cTimerClose(TimerHandle)
  328.  
  329. End Sub
  330.  
  331.  
  332.  
  333. Private Sub TestReadSaveCtlLanguageExt()
  334.  
  335.    Dim intResult        As Integer
  336.    Dim strResult        As String
  337.    Dim strDisplay       As String
  338.    
  339.    Dim i                As Integer
  340.    
  341.    Dim File1            As String
  342.    
  343.    strResult = ""
  344.    strDisplay = ""
  345.    
  346.    Call cObjectMethod(List1, "clear", "")
  347.    
  348.    File1 = T2WDirTest + "\save control language extended.test"
  349.    
  350.    strDisplay = strDisplay & "SaveCtlLanguageExt of this Form is '" & cSaveCtlLanguageExt(Me, 255, File1) & "'" & vbCrLf
  351.    
  352.    strDisplay = strDisplay & "ReadCtlLanguageExt of this Form is '" & cReadCtlLanguageExt(Me, 255, File1) & "'" & vbCrLf
  353.    
  354.    strDisplay = strDisplay & "Load file '" & File1 & "' into the list box 'List1' is '" & cFileToListBox(List1.hWnd, File1) & "'"
  355.  
  356.    txt_Result = strDisplay
  357.    
  358.    'time the function
  359.  
  360.    TimerHandle = cTimerOpen()
  361.    TimerStartOk = cTimerStart(TimerHandle)
  362.    
  363.    For i = 1 To Iteration
  364.       intResult = cReadCtlLanguageExt(Me, 1, File1)
  365.    Next i
  366.    
  367.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  368.    
  369.    TimerCloseOk = cTimerClose(TimerHandle)
  370.  
  371. End Sub
  372.  
  373. Private Sub SSOption1_Click(Index As Integer, Value As Integer)
  374.  
  375.    Dim intResult        As Integer
  376.  
  377.    If (cmb_Function.ListIndex = 0) Then
  378.       If (Index = 0) Then
  379.          intResult = cReadCtlLanguage(Me, 255, T2WDirInst + "!languk1.T2W")
  380.       Else
  381.          intResult = cReadCtlLanguage(Me, 255, T2WDirInst + "!langfr1.T2W")
  382.       End If
  383.    Else
  384.       If (Index = 0) Then
  385.          intResult = cReadCtlLanguageExt(Me, 255, T2WDirInst + "!languk2.T2W")
  386.       Else
  387.          intResult = cReadCtlLanguageExt(Me, 255, T2WDirInst + "!langfr2.T2W")
  388.       End If
  389.    End If
  390.  
  391. End Sub
  392.  
  393.  
  394.